/*++
 
Module Name:

    Driver.cpp

Abstract:

    This module contains the implementation of the WP7 Accelerometer Sensor's 
    core driver callback object.
--*/

#include "internal.h"
#include "WP7AccelerometerSensor.h" // IDL Generated File
#include "Driver.h"
#include "Device.h"

#include "driver.tmh"

/////////////////////////////////////////////////////////////////////////
//
// CWP7AccelerometerDriver::CWP7AccelerometerDriver
//
// Object constructor function
//
/////////////////////////////////////////////////////////////////////////
CWP7AccelerometerDriver::CWP7AccelerometerDriver()
{
}

/////////////////////////////////////////////////////////////////////////
//
// CWP7AccelerometerDriver::OnDeviceAdd
//
// The framework call this function when device is detected. This driver
// creates a device callback object
//
// Parameters:
//      pDriver     - pointer to an IWDFDriver object
//      pDeviceInit - pointer to a device initialization object
//
// Return Values:
//      S_OK: device initialized successfully
//
/////////////////////////////////////////////////////////////////////////
HRESULT CWP7AccelerometerDriver::OnDeviceAdd(
    __in IWDFDriver* pDriver,
    __in IWDFDeviceInitialize* pDeviceInit
    )
{
	Trace(TRACE_LEVEL_INFORMATION, "%!FUNC! Entry");
    HRESULT hr = CWP7AccelerometerDevice::CreateInstance(pDriver, pDeviceInit);

    return hr;
}
/////////////////////////////////////////////////////////////////////////
//
// CWP7AccelerometerDriver::OnInitialize
//
//  The framework calls this function just after loading the driver. The driver
//  can perform any global, device independent intialization in this routine.
//
/////////////////////////////////////////////////////////////////////////
HRESULT CWP7AccelerometerDriver::OnInitialize(
    __in IWDFDriver* pDriver
    )
{
    UNREFERENCED_PARAMETER(pDriver);
    return S_OK;
}

/////////////////////////////////////////////////////////////////////////
//
// CWP7AccelerometerDriver::OnDeinitialize
//
//  The framework calls this function just before de-initializing itself. All
//  WDF framework resources should be released by driver before returning
//  from this call.
//
/////////////////////////////////////////////////////////////////////////
void CWP7AccelerometerDriver::OnDeinitialize(
    __in IWDFDriver* pDriver
    )
{
    UNREFERENCED_PARAMETER(pDriver);
    return;
}

